package kr.saeildamil.androidstudy_second.br_service;

import kr.saeildamil.androidstudy_second.R;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.widget.Toast;

public class OnSaveZone extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch2930_onsavezone);
	}
	@Override
	protected void onResume() {
		super.onResume();
		IntentFilter filter = new IntentFilter();
		filter.addAction("kr.saeildamil.androidstudy_second.SAVEZONE");
		registerReceiver(mSaveZoneBR, filter);
	}
	protected void onPause() {
		super.onPause();
		unregisterReceiver(mSaveZoneBR);
	};
	BroadcastReceiver mSaveZoneBR = new BroadcastReceiver() {
		
		@Override
		public void onReceive(Context arg0, Intent arg1) {
			Toast.makeText(OnSaveZone.this, "아싸! 공짜다", Toast.LENGTH_SHORT).show();
			
		}
	};
}
